home *** CD-ROM | disk | FTP | other *** search
- /* graphics libraries:
- general library interfaces
- by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
- Copyright 1987 - 1991 Apple Computer, Inc. All rights reserved. */
-
- #pragma once
- #ifndef graphicsLibrariesIncludes
- #define graphicsLibrariesIncludes
-
- #ifndef graphicsRoutinesIncludes
- #include "graphics routines.h"
- #endif
- #ifndef mathRoutinesIncludes
- #include "math routines.h"
- #endif
-
- #ifndef qdTextIncludes
- #define DrawChar gDrawChar
- #endif
-
- /* We use “if( a ) b; else” instead of “{ if (a ) b; }” because the first one can be used in an if-else
- statement and the second one can’t (due to the “;” at the end of the macro instance. */
-
- #define NilShapeReturn(a) if ((a) == (gxShape) nil) {GXPostGraphicsError(shape_is_nil); return; } else
- #define NilShapeReturnNil(a) if ((a) == (gxShape) nil) {GXPostGraphicsError(shape_is_nil); return 0L; } else
- #define NilStyleReturn(a) if ((a) == (gxStyle) nil) {GXPostGraphicsError(style_is_nil); return; } else
- #define NilStyleReturnNil(a) if ((a) == (gxStyle) nil) {GXPostGraphicsError(style_is_nil); return 0L; } else
- #define NilInkReturn(a) if ((a) == (gxInk) nil) {GXPostGraphicsError(ink_is_nil); return; } else
- #define NilInkReturnNil(a) if ((a) == (gxInk) nil) {GXPostGraphicsError(ink_is_nil); return 0L; } else
- #define NilTransformReturn(a) if ((a) == (gxTransform) nil) {GXPostGraphicsError(transform_is_nil); return; } else
- #define NilTransformReturnNil(a) if ((a) == (gxTransform) nil) {GXPostGraphicsError(transform_is_nil); return 0L; } else
- #define NilColorSetReturn(a) if ((a) == (gxColorSet) nil) {GXPostGraphicsError(colorSet_is_nil); return; } else
- #define NilColorSetReturnNil(a) if ((a) == (gxColorSet) nil) {GXPostGraphicsError(colorSet_is_nil); return 0L; } else
- #define NilColorProfileReturn(a) if ((a) == (gxColorProfile) nil) {GXPostGraphicsError(colorProfile_is_nil); return; } else
- #define NilColorProfileReturnNil(a) if ((a) == (gxColorProfile) nil) {GXPostGraphicsError(colorProfile_is_nil); return 0L; } else
- #define NilTagReturn(a) if ((a) == (gxTag) nil) {GXPostGraphicsError(tag_is_nil); return; } else
- #define NilTagReturnNil(a) if ((a) == (gxTag) nil) {GXPostGraphicsError(tag_is_nil); return 0L; } else
-
- #ifdef debugging
- /* just in case the application (or the graphics system) redefined these to something weird... */
- #undef DebugStr
- #undef IfDebug
-
- #define IfDebug(a, b) if (a) DebugStr(b); else
- #define IfDebugReturn(a, b) if (a) { DebugStr(b); return; } else
- #define IfDebugReturnNil(a, b) if (a) { DebugStr(b); return 0L; } else
- #define NilParamReturn(a) if ((a) == 0L) {GXPostGraphicsError(parameter_is_nil); return; } else
- #define NilParamReturnNil(a) if ((a) == 0L) {GXPostGraphicsError(parameter_is_nil); return 0L; } else
- #define IfErrorReturn(a,b) if (a) { GXPostGraphicsError(b); return; } else
- #define IfErrorReturnNil(a,b) if (a) { GXPostGraphicsError(b); return 0L; } else
- #define IfNotice(a, b) if (a) GXPostGraphicsNotice(b); else
- #define IfWarning(a,b) if (a) GXPostGraphicsWarning(b); else
- #define IfWarningReturn(a,b) if (a) { GXPostGraphicsWarning(b); return; } else
- #define IfWarningReturnNil(a,b) if (a) { GXPostGraphicsWarning(b); return 0L; } else
- #else
- #define IfDebug(a, b)
- #define IfDebugReturn(a, b)
- #define IfDebugReturnNil(a, b)
- #define NilParamReturn(a)
- #define NilParamReturnNil(a)
- #define IfErrorReturn(a,b)
- #define IfErrorReturnNil(a,b)
- #define IfNotice(a, b)
- #define IfWarning(a,b)
- #define IfWarningReturn(a,b) if (a) return; else
- #define IfWarningReturnNil(a,b) if (a) return 0L; else
- #endif
-
-
- typedef enum {
- /* gxColor names */
- gxWhite = 1, gxBlack, gxGray, gxGrey = gxGray,
- #ifndef __QUICKDRAW__
- white = 1, black, gray, grey = gray,
- #endif
- /* primaries */
- red, green, blue,
- /* secondaries */
- cyan, magenta, yellow,
- /* tertiaries */
- orange, chartreuse, aqua, teal = aqua,
- slate, purple, violet = purple, maroon,
- /* others */
- brown, pink, turquoise,
- cadmium_lemon, cadmium_light_yellow, aureoline_yellow, naples_deep_yellow,
- cadmium_yellow, cadmium_deep_yellow, cadmium_orange, cadmium_light_red,
- cadmium_deep_red, geranium_lake, alizarin_crimson, rose_madder,
- madder_deep_lake, brown_madder, permanent_red_violet, cobalt_deep_violet,
- ultramarine_violet, ultramarine_blue, cobalt_blue, royal_blue,
- cerulean_blue, manganese_blue, indigo, turquoise_blue,
- emerald_green, permanent_green, viridian_light, cobalt_green,
- cinnabar_green, sap_green, chromium_oxide_green, terre_verte,
- yellow_ochre, mars_yellow, raw_sienna, mars_orange,
- gold_ochre, brown_ochre, deep_ochre, burnt_umber,
- burnt_sienna, flesh, flesh_ochre, english_red,
- venetian_red, indian_red, raw_umber, greenish_umber,
- van_dyck_brown, sepia, warm_grey, cold_grey,
- ivory_black, lamp_black, titanium_white, zinc_white,
- pale_gold, gold, old_gold, pink_gold,
- white_gold, yellow_gold, green_gold, platinum,
- silver, antique_silver, chrome, steel,
- copper, antique_copper, oxidized_copper, bronze,
- brass, iron, rusted_iron, lead,
- fluorescent_pink, fluorescent_green, fluorescent_blue,
- incadescent_high, incadescent_low,
- moonlight, sodium, daylight, dawn,
- afternoon, dusk,
- mauve,
- apple_green, apple_yellow, apple_orange, apple_red,
- apple_purple, apple_blue,
-
- /* gxColor modifiers */
- light = 512,
- dark = 1024,
- warm = 2048,
- reddish = warm,
- cool = 4096,
- bluish = cool,
- grayish = 8192,
- whitish = light,
- blackish = dark,
- greenish = 16384
- } commonColors;
-
-
- typedef long commonColor;
-
- extern gxColorSet commonColorSet;
- extern gxSetColor commonColorList[];
- extern short commonColorCount;
-
- /* some very useful constructive definitions for creating colors */
- /* see 'gxColor library.c' for an example of their use... */
-
- #define makeRGBSHORT(a,b,c) ((c >> 14) + ((b >> 13) + (a >> 13) << 3) << 3)
- #define makeCMYKSHORT(a,b,c,d) ((d >> 14) + ((c >> 14) + ((b >> 14) + (a >> 14) << 2) << 2) << 2)
- #define makeRGB16(a,b,c) ((c >> 11) + ((b >> 11) + (a >> 11) << 5) << 5)
- #define makeCMYK16(a,b,c,d) ((d >> 12) + ((c >> 12) + ((b >> 12) + (a >> 12) << 4) << 4) << 4)
- #define xRGB256(a,b,c) {gxRGBSpace,nil,{(a << 8)+a,(b << 8)+b,(c << 8)+c, 0 }}
-
- #define xRGB(a,b,c) {gxRGBSpace,nil,{a,b,c,0}}
- #define xCMYK(a,b,c,d) {gxCMYKSpace,nil,{a,b,c,d}}
- #define xHSV(a,b,c) {gxHSVSpace,nil,{a,b,c,0}}
- #define xCIE(a,b,c) {gxCIESpace,nil,{a,b,c,0}}
- #define xYIQ(a,b,c) {gxYIQSpace,nil,{a,b,c,0}}
- #define xXYZ(a,b,c) {gxXYZSpace,nil,{a,b,c,0}}
- #define xYUV(a,b,c) {yuvSpace,nil,{a,b,c,0}}
- #define xLUV(a,b,c) {gxLUVSpace,nil,{a,b,c,0}}
- #define xLAB(a,b,c) {gxLABSpace,nil,{a,b,c,0}}
- #define xHLS(a,b,c) {gxHLSSpace,nil,{a,b,c,0}}
- #define xACC(a,b,c) {accSpace,nil,{a,b,c,0}}
- #define xNTSC(a,b,c) {gxNTSCSpace,nil,{a,b,c,0}}
- #define xPAL(a,b,c) {gxPALSpace,nil,{a,b,c,0}}
- #define xSECAM(a,b,c) {secamSpace,nil,{a,b,c,0}}
- #define xDIGITALVIDEO(a,b,c) {digitalVideoSpace,nil,{a,b,c,0}}
- #define xGRAY(a) {gxGraySpace,nil,{a,0,0,0}}
- #define xRGB16(a,b,c) {gxRGB16Space,nil,{makeRGB16(a,b,c),0,0,0}}
- #define xCMYK16(a,b,c,d) {cmyk16Space,nil,{makeCMYK16(a,b,c,d),0,0,0}}
- #define xRGB32(a,b,c) {gxRGB32Space,nil,{(a >> 8),((c >> 8) + (b >> 8) << 8),0,0}}
- #define xCMYK32(a,b,c,d) {gxCMYK32Space,nil,{((b >> 8) + (a >> 8) << 8),((d >> 8) + (c >> 8) << 8),0,0}}
-
- #define sRGB(r,g,b) {r,g,b,0}
- #define sCMYK(c,m,y,k) {c,m,y,k}
- #define sRGB256(a,b,c) {(a << 8)+a,(b << 8)+b,(c << 8)+c, 0 }
-
- #ifndef __TYPES__
- /* The following items are duplicated in Types.h, so we skip them here. */
- typedef enum {
- bold = 1,
- italic = 2,
- underline = 4,
- outline = 8,
- shadow = 0x10,
- condense = 0x20,
- extend = 0x40
- } commonFaces;
-
- #endif /* ifndef __TYPES__ */
-
- enum {
- plain,
- lighten = 0x80
- };
-
- typedef char commonFace;
-
-
- typedef enum { /* These modes simulate QuickDraw's transfer modes */
- commonAddOverMode = 2000,
- commonSubtractOverMode,
- commonSubtractPinMode,
- commonTransparentMode,
- commonInMode,
- commonOutMode
- } commonTransferModes;
-
- typedef short commonTransferMode;
-
- typedef struct {
- gxPoint a;
- gxPoint b;
- gxPoint c;
- gxPoint d;
- } cubic;
-
- typedef struct {
- gxPoint a;
- gxPoint b;
- gxPoint c;
- fixed lambda;
- } conic;
-
- /* gxShape library */
- gxShape NewPath(const gxPath *);
- gxShape NewPolygon(const gxPolygon *);
- gxPolygon *GetPolygon(gxShape, long contour, gxPolygon *);
- gxPath *GetPath(gxShape, long contour, gxPath *);
- void SetPath(gxShape, long contour, const gxPath *);
- void SetPolygon(gxShape, long contour, const gxPolygon *);
- void DrawPolygon(const gxPolygon *, gxShapeFill);
- void DrawPath(const gxPath *, gxShapeFill);
-
- void SetShapeIndexPoint(gxShape, long index, const gxPoint *);
- void SetShapeIndexControl(gxShape, long index, long control);
- gxPoint *GetShapeIndexPoint(gxShape, long index, gxPoint *);
- long GetShapeIndexControl(gxShape, long index, long *control);
-
- void InsertShape(gxShape, long index, gxShape toAdd);
- gxShape ExtractShape(gxShape source, long firstPoint, long numPoints);
- void AddToShape(gxShape dest, gxShape add);
- void ExtendShape(gxShape dest, gxShape add);
-
- #ifdef debugging
- gxShape NewShape2(gxShapeType, fixed, fixed);
- gxShape NewShape4(gxShapeType, fixed, fixed, fixed, fixed);
- gxShape NewShape6(gxShapeType, fixed, fixed, fixed, fixed, fixed, fixed);
-
- void SetShape2(gxShape, fixed, fixed);
- void SetShape4(gxShape, fixed, fixed, fixed, fixed);
- void SetShape6(gxShape, fixed, fixed, fixed, fixed, fixed, fixed);
- #else
- #define NewShape2(type,p1,p2) NewShapeMany(type, (fixed)p1, (fixed)p2)
- #define NewShape4(type,p1,p2, p3, p4) NewShapeMany(type, (fixed)p1, (fixed)p2, (fixed)p3, (fixed)p4)
- #define NewShape6(type,p1,p2, p3, p4, p5, p6) NewShapeMany(type, (fixed)p1, (fixed)p2, (fixed)p3, (fixed)p4, (fixed)p5, (fixed)p6)
-
- #define SetShape2(source,p1,p2) SetShapeMany(source, (fixed)p1, (fixed)p2)
- #define SetShape4(source,p1,p2, p3, p4) SetShapeMany(source, (fixed)p1, (fixed)p2, (fixed)p3, (fixed)p4)
- #define SetShape6(source,p1,p2, p3, p4, p5, p6) SetShapeMany(source, (fixed)p1, (fixed)p2, (fixed)p3, (fixed)p4, (fixed)p5, (fixed)p6)
- #endif
-
- gxShape NewShapeMany(gxShapeType type, fixed firstArg, ...);
- void SetShapeMany(gxShape target, fixed firstArg, ...);
-
- gxShape GetBitmapPartsFromFixedBounds(gxShape source, const gxRectangle *bounds);
- void SetBitmapPartsFromFixedBounds(gxShape target, const gxRectangle *bounds, gxShape bitmapShape);
-
- /* arc library, oval library, roundrect library, cubic library, and conic library */
- gxShape NewArc(const gxRectangle *, fixed startAng, fixed sweep, boolean wedge);
- gxShape NewOval(const gxRectangle *);
- gxShape NewRoundRect(const gxRectangle *, const gxPoint *ovalSize);
- gxShape NewCubic(const cubic*);
- gxShape NewConic(const conic*);
-
- void DrawArc(const gxRectangle *, fixed startAng, fixed sweep, boolean wedge);
- void DrawOval(const gxRectangle *, gxShapeFill);
- void DrawRoundRect(const gxRectangle *, const gxPoint *ovalSize, gxShapeFill);
- void DrawCubic(const cubic *, gxShapeFill);
- void DrawConic(const conic *, gxShapeFill);
-
- void SetArc(gxShape, const gxRectangle *, fixed startAng, fixed sweep, boolean wedge);
- void SetOval(gxShape, const gxRectangle *);
- void SetRoundRect(gxShape, const gxRectangle *, const gxPoint *ovalSize);
- void SetCubic(gxShape, const cubic *);
- void SetConic(gxShape, const conic *);
-
- /* graphics debug library */
- void SetGraphicsLibraryErrors(void); /* set the error and warning routines */
- void SetGraphicsLibraryNotices(void); /* set the notice routine */
- char *GraphicsErrorMessage(gxGraphicsError);
- char *GraphicsWarningMessage(gxGraphicsWarning);
- char *GraphicsNoticeMessage(gxGraphicsNotice);
- void DisplayGraphicsErrorMessage(gxGraphicsError, long);
- void DisplayGraphicsWarningMessage(gxGraphicsWarning, long);
- void DisplayGraphicsNoticeMessage(gxGraphicsNotice, long);
-
- /* gxShape library */
- void CenterShape(gxShape, gxRectangle *);
- void MoveShapeCenterTo(gxShape, fixed x, fixed y);
- void RotateShapeAboutCenter(gxShape, fixed degrees);
- void SkewShapeAboutCenter(gxShape, fixed xSkew, fixed ySkew);
- void ScaleShapeAboutCenter(gxShape, fixed hScale, fixed vScale);
-
- /* graphics library */
- void MapShapeToSpace(gxShape, gxViewPort, gxViewDevice);
- void MapShapeFromSpace(gxShape, gxViewPort, gxViewDevice);
- void MapPointToSpace(gxPoint *, gxViewPort, gxViewDevice);
- void MapPointFromSpace(gxPoint *, gxViewPort, gxViewDevice);
-
- /* gxTransform library */
- gxViewPort GetTransformViewPort(gxTransform);
- void SetTransformViewPort(gxTransform, gxViewPort);
- void AddToTransformViewPort(gxTransform target, gxViewPort);
- void SetShapeViewPort(gxShape, gxViewPort);
- gxViewPort GetShapeViewPort(gxShape);
- void SetDeepShapeViewPort(gxShape, gxViewPort);
- void SetDeepShapeViewPorts(gxShape, long count, const gxViewPort portList[]);
- void SetDeepShapeTransform(gxShape, gxTransform);
- void SetDefaultViewPort(gxViewPort);
- gxViewGroup CopyViewGroup(gxViewGroup group);
- gxTransform ChangeTransformViewGroup(gxTransform xform, gxViewGroup oldGroup, gxViewGroup newGroup);
- gxShape ChangeShapeViewGroup(gxShape source, gxViewGroup oldGroup, gxViewGroup newGroup);
- gxTransform SeparateShapeTransform(gxShape source);
- void ReuniteShapeTransform(gxShape target, gxTransform separate);
-
- /* graphics state library */
- gxStyle SeparateShapeStyle(gxShape source);
- void ReuniteShapeStyle(gxShape target, gxStyle separate);
- gxInk SeparateShapeInk(gxShape source);
- void ReuniteShapeInk(gxShape target, gxInk separate);
-
- /* gxShape library */
- void GetPathsIndexPointControl(const gxPaths *source, long index, gxPoint **pt, long **controlPtr, long *controlMask);
- void SetShapeOpenPath(gxShape target);
- void PreMapTransform(gxTransform source, gxMapping *map);
-
- /* graphics library */
- #define CopyShape(s) GXCopyToShape(nil,s)
- #define CopyStyle(s) GXCopyToStyle(nil,s)
- #define CopyInk(s) GXCopyToInk(nil,s)
- #define CopyTransform(s) GXCopyToTransform(nil,s)
- void DisposeTransformAt(gxTransform *target);
- void DisposeShapeAt(gxShape *target);
- void DisposeStyleAt(gxStyle *target);
- void DisposeInkAt(gxInk *target);
- void DisposeTagAt(gxTag *target);
-
- /* gxColor matching library */
- gxColorProfile CreateQMSColorProfile(void);
- gxColorProfile CreateCanonColorProfile(void);
-
- /* gxColor library */
- void InitCommonColors(void);
- void DisposeCommonColors(void);
- void SetShapeRGB(gxShape target, gxColorValue red, gxColorValue green, gxColorValue blue);
- void SetInkRGB(gxInk target, gxColorValue red, gxColorValue green, gxColorValue blue);
- void SetShapeHSV(gxShape target, gxColorValue hue, gxColorValue saturation, gxColorValue value);
- void SetInkHSV(gxInk target, gxColorValue hue, gxColorValue saturation, gxColorValue value);
- void SetShapeGray(gxShape target, gxColorValue gray);
- void SetInkGray(gxInk target, gxColorValue gray);
-
- /* gxTransferMode library, gxColor library, text library */
- void SetShapeCommonTransfer(gxShape target, commonTransferMode mode);
- void SetShapeCommonColor(gxShape target, commonColor gxColor);
- void SetShapeCommonFace(gxShape target, commonFace face);
-
- void SetInkCommonTransfer(gxInk target, commonTransferMode mode);
- void SetInkCommonColor(gxInk target, commonColor);
- void SetStyleCommonFace(gxStyle target, commonFace);
-
- commonTransferMode GetInkCommonTransfer(gxInk source);
- commonColor GetInkCommonColor(gxInk source);
- commonFace GetStyleCommonFace(gxStyle source);
-
- commonTransferMode GetShapeCommonTransfer(gxShape source);
- commonColor GetShapeCommonColor(gxShape source);
- commonFace GetShapeCommonFace(gxShape source);
-
- gxColor *SetCommonColor(gxColor *target, commonColor);
- commonColor GetCommonColor(const gxColor *source);
-
- /* gxColor library */
- gxColorSpace GetShapeColorSpace(gxShape target);
- gxColorProfile GetShapeColorProfile(gxShape source);
- gxColorSet GetShapeColorSet(gxShape source);
- gxColorSpace GetInkColorSpace(gxInk target);
- gxColorProfile GetInkColorProfile(gxInk source);
- gxColorSet GetInkColorSet(gxInk source);
-
- void SetShapeColorSpace(gxShape target, gxColorSpace space);
- void SetShapeColorProfile(gxShape target, gxColorProfile profile);
- void SetShapeColorSet(gxShape target, gxColorSet set);
- void SetInkColorSpace(gxInk target, gxColorSpace space);
- void SetInkColorProfile(gxInk target, gxColorProfile profile);
- void SetInkColorSet(gxInk target, gxColorSet set);
-
- gxColorSet GetViewDeviceColorSet(gxViewDevice source);
- void SetViewDeviceColorSet(gxViewDevice target, gxColorSet set);
- gxColorProfile GetViewDeviceColorProfile(gxViewDevice source);
- void SetViewDeviceColorProfile(gxViewDevice target, gxColorProfile profile);
-
- long GetColorSpaceComponents(gxColorSpace space);
-
- /* gxTransferMode library */
- void InitTransferMode(gxTransferMode *);
- gxTransferMode *SetCommonTransfer(gxTransferMode *transferModeRecord, commonTransferMode mode, unsigned short opValue, const gxColor *opColor);
- gxColor *TransmogrifyColor(gxColor *dstColor, const gxColor *srcColor, const gxTransferMode *);
- void SetInkFastXorTransfer(gxInk inky, gxViewDevice destDevice, gxColor *background, gxColor *result);
- void SetShapeFastXorTransfer(gxShape source, gxColor *background, gxColor *result);
-
- gxShape NewCString(const char *cString, const gxPoint *position);
- gxShape NewPString(const char *pascalString, const gxPoint *position);
- gxShape NewChar(const char theChar, const gxPoint *position);
- void SetCString(gxShape target, const char *cString, const gxPoint *position);
- void SetPString(gxShape target, const char *pascalString, const gxPoint *position);
- void SetChar(gxShape target, char theChar, const gxPoint *position);
- void DrawCString(const char *cString, const gxPoint *position);
- void DrawPString(const char *pascalString, const gxPoint *position);
- #ifndef qdTextIncludes
- void DrawChar(const char theChar, const gxPoint *position);
- #endif
-
- fixed FixTextWidth(const unsigned char *, short length);
- fixed FixCStringWidth(const char *);
- fixed FixPStringWidth(const char *);
- fixed FixCharWidth(char);
- gxPoint *GetShapeAdvance(gxShape target, gxPoint *advance);
-
- void SetGlyphText(gxShape, const unsigned char *text, long length);
- void SetGlyphAdvance(gxShape, const long advanceBits[]);
- void SetGlyphStyles(gxShape, const short styleRuns[], const gxStyle glyphStyles[]);
-
- long GetGlyphText(gxShape, unsigned char *text);
- long GetGlyphAdvance(gxShape, long advanceBits[]);
- long GetGlyphStyles(gxShape, short styleRuns[], gxStyle glyphStyles[]);
-
- /* gxMapping library */
- void PolyToPolyMap(const gxPolygon *source, const gxPolygon *dest, gxMapping *);
-
- /* gxShape library */
- void PaintRectangle(const gxRectangle *, commonColor);
- void PaintRectangle2(const gxPoint *, const gxPoint *, commonColor);
- void PaintRectangle4(long left, long top, long right, long bottom, commonColor);
-
- /* picture library */
- void AddToPicture(gxShape picture, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform);
- void InsertPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform);
- gxShape GetPictureItem(gxShape picture, long index, gxShape *destShape, gxStyle *destStyle, gxInk *destInk, gxTransform *destTransform);
- void SetPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform);
-
- /* user library */
- void AddShapeUser(gxShape source, const void *data, long length, long type);
- long GetShapeUser(gxShape source, void *data, long *length, long requestedType, long *foundType, long index);
- void RemoveShapeUser(gxShape source, long type, long index);
-
- /* ramp library */
- gxShape NewRamp(const gxColor *firstColor, const gxColor *lastColor, long steps, const gxRectangle *bounds);
- void DrawRamp(const gxColor *firstColor, const gxColor *lastColor, long steps, const gxRectangle *bounds);
- gxShape NewCommonRamp(commonColor firstColor, commonColor lastColor, long steps, const gxRectangle *bounds);
- void DrawCommonRamp(commonColor firstColor, commonColor lastColor, long steps, const gxRectangle *bounds);
-
- /* spline library */
- #define circleSlack ((fract)0x3504f334) /* if the points form a square, this slop will approximate a circle */
- enum { openSpline, closedSpline }; /* passed as the closed parameter */
- gxShape MirrorSpline(long count, gxPoint *points, fract slack, boolean closed);
-
- /* framing libarary */
- void OutsetShape(gxShape source, fixed distance);
- void FrameShape(gxShape source, fixed distance);
-
- #ifdef MacintoshIncludes
- #ifndef qdTextIncludes
- #undef DrawChar
- #endif
- #endif
- #endif
-